package lab01;

import java.util.Scanner;

/**
 * Created by Administrator on 2017/9/30.
 */
public class Test06 {
    public static void main(String[] args) {
        print_grade();
        printgrade();
    }

    static void print_grade() {
        System.out.println("请输入学生成绩：");
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        if (x == 1) {
            System.out.println("不及格");
        } else if (x == 2) {
            System.out.println("及格");
        } else if (x == 3) {
            System.out.println("中等");
        } else if (x == 4) {
            System.out.println("良好");
        } else if (x == 5) {
            System.out.println("优秀");
        } else {
            System.out.println("输入成绩错误！请仔细核对！");
        }
    }

    static void printgrade() {
        System.out.println("请输入该学生的成绩：");
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        switch (x) {
            case 1:
                System.out.println("不及格");
                break;
            case 2:
                System.out.println("及格");
                break;
            case 3:
                System.out.println("中等");
                break;
            case 4:
                System.out.println("良好");
                break;
            case 5:
                System.out.println("优秀");
                break;
            default:
                System.out.println("输入有误");
        }
    }
}
